package cn.hbu.zlfw.system.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import cn.hbu.zlfw.common.base.dao.impl.BaseDaoImpl;
import cn.hbu.zlfw.common.util.PageModel;
import cn.hbu.zlfw.common.util.Utility;
import cn.hbu.zlfw.system.dao.AdminUserDao;
import cn.hbu.zlfw.system.entity.AdminUser;

/**
 * 
 *@ClassName:AdminUserDaoImpl.java
 *@Description:  级管理员dao接口实现
 *@Author:lxt<839376636@qq.com>
 *@Date:2017年10月6日下午6:50:34
 *@Version:1.1.0
 */
@Repository("adminUserDao")
public class AdminUserDaoImpl extends BaseDaoImpl<AdminUser, String> implements AdminUserDao {

	@Override
	public PageModel findAdminUserList(PageModel pageModel, String userName,List<String> userIds) {
		Map<String,Object> params = Utility.getMapInstance();
		params.put("userName", "%"+userName+"%");
		params.put("userIds",userIds);
		StringBuffer sbfHql = new StringBuffer();
		sbfHql.append("from AdminUser where userName like :userName and id in (:userIds)");
		return this.findListByParams(sbfHql.toString(), null, params, pageModel);
	}

	
}
